/**
 * 
 */
package com.isaac.actm.ui.struts2;

import org.hibernate.stat.Statistics;

import com.isaac.actm.domain.util.JpaUtil;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

/**
 * @author ybak
 *
 */
public class CacheStatisticsAction extends ActionSupport implements ModelDriven<Statistics> {

    private static final long serialVersionUID = 5900866776456839005L;
    
    private JpaUtil jpaUtil;
    
	private Statistics statistics;

    public Statistics getStatistics() {
		return statistics;
	}

	public void setStatistics(Statistics statistics) {
		this.statistics = statistics;
	}

	public Statistics getModel() {
		return statistics;
	}

	@Override
    public String execute() throws Exception {
       	statistics = jpaUtil.getJpaStatistics();
        return SUCCESS;
    }

	public JpaUtil getJpaUtil() {
		return jpaUtil;
	}

	public void setJpaUtil(JpaUtil jpaUtil) {
		this.jpaUtil = jpaUtil;
	}
    
    

}
